<?php
class Mozg_Collection_Libs extends Mozg_Collection
{
    /**
		задаем имя класса объектов коллекции
     */
    protected $_itemClassName = 'Mozg_Lib';
    protected static $_instance;
    
    static public function GetInstance ()
    {
        if (! (self::$_instance instanceof self)) self::$_instance = new self();
        return self::$_instance;
    }
    
    public function Get ($libName)
    {
        $libClassName = $this->GetClassName($libName);
        return new $libClassName();
    }
    
    public function IsExists($libName)
    {
        return class_exists($this->GetClassName($libName));
    }
    
    protected function GetClassName($libName)
    {
    	return 'Mozg_Lib_' .$libName;
    }
}